﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using System.Drawing;
using System.Windows.Forms;
using Styx;
using Styx.Combat.CombatRoutine;
using Styx.Helpers;
using Styx.Logic;
using Styx.Logic.Combat;
using Styx.Logic.Pathing;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using Styx.Logic.POI;

namespace HarmoniousVigor
{
    public partial class Paladin
    {
        public bool retributionDungeonCombat()
        {
            if (retributionThreatDropBehavior())
                return true;
            retributionRepentanceCheckBehavior();
            if (retributionRegularBehavior())
                return false;

            if (targetRange > meleeRange)
            {
                if (retributionRangedCombatBehavior())
                    return true;
            }
            else
            {
                if (retributionInterruptBehavior())
                    return true;

                if (!SpellManager.GlobalCooldown)
                {
                    if (retributionCrowdControlBehavior())
                        return true;
                    if (retributionMeleeCombatBehavior())
                        return true;
                }
            }

            return false;
        }
        public bool retributionDungeonHeal()
        {
            if (characterPlayer.HealthPercent < 20 && !characterPlayer.HasAura("Forbearance"))
            {
                if (Utils.CastMe("Lay on Hands"))
                    return true;

                if (Utils.CastMe("Divine Shield"))
                    return true;

                if (Utils.CastMe("Hand of Protection"))
                    return true;
            }
            if (characterPlayer.HealthPercent < 60 && characterPlayer.Combat)
            {
                if (Utils.CastMe("Divine Protection"))
                    return true;
            }

            if (characterPlayer.HealthPercent < 60)
            {
                if (HasFullHolyPower)
                {
                    if (Utils.CastMe("Word of Glory"))
                        return true;
                }
            }
            return false;
        }
        public bool retributionDungeonBuff()
        {
            if (retributionCooldownBehavior())
                return true;
            return false;
        }
        public bool retributionDungeonPullSpell()
        {
            return false;
        }
    }
}
